package com.auto.sns.core.action;

import java.util.Date;

import com.auto.sns.core.domain.SnsCoreTopic;
import com.auto.sns.core.domain.SnsCoreVote;
import com.auto.sns.core.service.SnsCoreServiceFactory;
import com.auto.tools.AutoUtils;
import com.system.common.BaseAction;
import com.system.util.JsonUtil;

/**
 * 话题action
 * @author wsh
 *
 */
public class SnsCoreTopicAction extends BaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5776704355715112917L;

	/**
	 * 添加话题
	 * @throws Exception 
	 */
	public void saveOrUpdateSnsCoreTopic() throws Exception{
		String data = getRequest().getParameter("data");
		SnsCoreTopic snsCoreTopic = (SnsCoreTopic)JsonUtil.jsonToBean(data, SnsCoreTopic.class);
		
		snsCoreTopic.setPubDate(new Date());
		snsCoreTopic.setPubUserCode(AutoUtils.getUserCode());
		snsCoreTopic.setPubUserName(AutoUtils.getUserCode());
		
		SnsCoreServiceFactory.snsCoreInfoService.saveOrUpdateSnsCoreTopic(snsCoreTopic);
	}
	/**
	 * 获取热门话题
	 */
	public void getPopTopicInfoList(){
		
	}
	
	/**
	 * 获取关注话题
	 */
	public void getAttentionTopicInfoList(){
		
	}
	
	/**
	 * 获取当前话题列表
	 */
	public void getTopicInfoList(){
		
	}
	
	/**
	 * 获取某个话题详细信息
	 */
	public void getTopicInfo(){
		
	}
	
	/**
	 * 处理话题
	 */
	public void topicInfoManager(){
		
	}
	
	/**
	 * 回复话题
	 */
	public void replyTopicInfo(){
		
	}
	
	/**
	 * 推荐话题
	 */
	public void commendTopicInfo(){
		
	}
	
	/**
	 * 收藏话题
	 */
	public void collectionTopicInfo(){
		
	}
	
	/**
	 * 删除话题
	 */
	public void deleteTopicInfo(){
		
	}
}